﻿var img = new Images();
var cnt = 0;
var nowp = new NowPlaying(newSong);

function newSong() {
	img.fetch_art(nowp.getArtist(), nowp.getAlbum(), 0);
}

function next() {
	cnt++;
	if(cnt > img.getResults()) {
		cnt = 0;
	}
	img.fetch_art(nowp.getArtist(), nowp.getAlbum(), cnt);
}

function view_onOpen() {
	nowp.request_update();
	options.putDefaultValue("size", "0");
}

function changed() {
	img.fetch_art(nowp.getArtist(), nowp.getAlbum(), 0);
}